/**
 * 
 * 广州锐鹏计算机科技有限公司（www.ruipengkj.com）
 * 
 * 
 * Copyright (c) 2011-2012 RUIPENGKJ.Co.Ltd. All rights reserved.
 * 
 * */
package com.ruipengkj.service;

import java.util.List;

import com.ruipengkj.bean.TCommodity;
import com.ruipengkj.bean.TProductCatalog;
import com.ruipengkj.commons.base.query.PageModel;
import com.ruipengkj.commons.service.IGenericService;
/**
 * 说明：
 * 商品Service层接口
 * @Author：李智深
 * @Date：2012-03-16
 */
public interface TCommodityService extends IGenericService<TCommodity, String>{
	//	根据条形码查询 查询条形码是否为空
	public PageModel<TCommodity> getByBarcodeNullService(int firstResult,
			int maxResult,int Barcode)throws Exception ;
//	查询条形码最大的商品
	public PageModel<TCommodity> getByMaxBarcodeService()throws Exception;
	//根据条形码查询
	public TCommodity getByBarcodeService(String Barcode)throws Exception ;
	//商品导出Excel
	public List<TCommodity> findTCommodityExportService(TCommodity entity,List<TProductCatalog> tProductCatalogList)throws Exception ;
	//多分类查询
	public PageModel<TCommodity> getScrollService(int firstResult,
			int maxResult, TCommodity entity, List<TProductCatalog> tProductCatalogList) throws Exception;
	/**翻页查询商品列表+分类查询*/
	public PageModel<TCommodity> getScrollListService(int firstResult,int maxResult,TCommodity entity, List<TProductCatalog> tProductCatalogList) throws Exception ;
	/**翻页查询商品列表*/
	public PageModel<TCommodity> getScrollListService(int firstResult,int maxResult,TCommodity entity) throws Exception ;
	/**查询商品列表+分类查询*/
	public TCommodity findByIdService(String id) throws Exception;
	/**查询商品列表+名称查询*/
	public List<TCommodity> findByNameService(String name) throws Exception;
	/**根据商品分类ID优化查询*/
	public PageModel<TCommodity> getScrollService(int firstResult,
		int maxResult, String CatalogId) throws Exception;
	
	public int executeSQL(String sql);//执行sql
	public List<Object[]> querySQL(String sql);//执行sql查询
}
